package com.dongdongshop.jop;

import com.dongdongshop.service.OrderService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Controller;

@Controller
public class OrderEmil {

    @DubboReference
    private OrderService orderService;

    public String  toOrderEmil() throws Exception {
        Integer orderYester = orderService.selectByYesterday();
        Integer orderToDay = orderService.selectByToday();
        double d = (orderToDay - orderYester)/orderYester * 100;
        String str = "昨日订单量 "+orderYester+" 今日订单量  "+orderToDay+" 环比增加 "+d+"% ";
        return str;
    }


}
